#pragma once
#include "ShortReadUtil.h"
#include <string>
// Exons serious
class CTIsoform
{
public:
    CTIsoform(void);
    ~CTIsoform(void);
    vector< pair <int, int> > exons;
    int addExon(pair <int, int> Exon, bool forward);
    int deleteExon(void);
    int printIsoform(ostream& out);
    bool forward;
};

// NT and AA Sequence serious
class CIsoformInfo : public CTIsoform
{
public:
    CIsoformInfo(string isoformId);
    CIsoformInfo(CTIsoform& isoform);
    ~CIsoformInfo(void);
    string isoformId;
    string geneName;
    vector<pair <int, int> > junctions;
    pair<int,int> frame;
    string seq;
    string codingSeq;
    int aaSize;
    int ntSize;
    int CDSscore;
private:
    int initialization(void);
};

class CIsoformInfoCompByCDSscore
{   // Compare functor for forward junctions
public:
    CIsoformInfoCompByCDSscore () {
        ;
    }
    ~CIsoformInfoCompByCDSscore () {
        ;
    }
    bool operator()(CIsoformInfo i1, CIsoformInfo i2) {
        return(( i1.CDSscore < i2.CDSscore ) || \
               ( i1.CDSscore == i2.CDSscore && i1.aaSize < i2.aaSize ));
    }
};

// get the spliced mRNA (spliced) sequence
int getMRNASeq(CTIsoform& isoforms, const char* contig, char* mRNABuf);